<template>
  <div class="condition-index">
    <el-form :inline="true" :model="queryForm" @submit.native.prevent>
      <el-form-item label="条件单类型">
        <el-select v-model="queryForm.type" placeholder="请选择活动区域" style="width: 120px;">
          <el-option label="全部" :value="1"></el-option>
          <el-option label="未触发" :value="2"></el-option>
          <el-option label="已删除" :value="3"></el-option>
          <el-option label="到期删除" :value="4"></el-option>
          <el-option label="已触发" :value="5"></el-option>
          <el-option label="指令失败" :value="6"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-radio-group v-model="queryForm.cycle">
          <el-radio label="不指定周期" :value="0"></el-radio>
          <el-radio label="指定周期" :value="1"></el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item>
        <el-date-picker
          v-model="queryForm.time"
          type="datetimerange"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button icon="el-icon-search" type="primary" @click="queryData">
          查询
        </el-button>
      </el-form-item>
    </el-form>
    <el-table
      v-loading="listLoading"
      :data="list"
      :element-loading-text="elementLoadingText"
    >
      <el-table-column
        align="center"
        prop="name"
        label="账号"
        min-width="80"
      ></el-table-column>
      <el-table-column
        align="center"
        prop="number"
        label="条件单编号"
        min-width="150"
      ></el-table-column>
      
      <el-table-column
        align="center"
        prop="status"
        label="状态"
        min-width="60"
      ></el-table-column>
      <el-table-column
        align="center"
        prop="condition"
        label="条件"
        min-width="180"
      ></el-table-column>
      <el-table-column
        align="center"
        prop="type"
        label="下单类型"
        min-width="80"
      ></el-table-column>
      <el-table-column
        align="center"
        prop="price"
        label="下单价格"
        min-width="80"
      ></el-table-column>
      <el-table-column
        align="center"
        prop="buy"
        label="买卖"
        min-width="60"
      ></el-table-column>
      <el-table-column
        align="center"
        prop="flat"
        label="开平"
        min-width="60"
      ></el-table-column>
      <el-table-column
        align="center"
        prop="quantity"
        label="数量"
        min-width="60"
      ></el-table-column>
      <el-table-column
        align="center"
        prop="duetime"
        label="有效日期"
        min-width="120"
      ></el-table-column>
      <el-table-column
        align="center"
        prop="remark"
        label="备注"
        min-width="150"
      ></el-table-column>
      <el-table-column
        align="center"
        prop="createTime"
        label="创建时间"
        min-width="150"
      ></el-table-column>
      <el-table-column
        align="center"
        prop="triggerTime"
        label="触发时间"
        min-width="150"
      ></el-table-column>
      <el-table-column
        align="center"
        prop="log"
        min-width="150"
        label="触发日志"
      ></el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
  data() {
    return {
      queryForm: {
        type: 1,
        cycle: 0,
        time: [],
      },
      listLoading: false,
      list: [],
      elementLoadingText: '正在加载...',
    }
  },
  methods: {
    queryData() {}
  }
}
</script>
<style lang="scss" scoped>
  .condition-index {
    padding: 20px;
    ::v-deep {
      .el-form-item {
        margin-right: 16px;
      }
      .el-radio:not(:last-child) {
        margin-right: 12px;
      }
    }
  }
</style>